package com.cicc.beergamevirtualsimulationsystem.common.enums.RecordEnum;

import com.cicc.beergamevirtualsimulationsystem.common.enums.BaseEnum;
import lombok.Getter;
@Getter
public enum CapacityEnum implements BaseEnum {
    LEVEL_ZERO(0, "0级"),
    LEVEL_ONE(1, "1级"),


    ;

    private Integer code;
    private String desc;

    public static final Integer CAPACITY_NUM = 200;

    CapacityEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static Integer maxCapacity(){
        Integer maxCapacity = 0;
        CapacityEnum[] enums = CapacityEnum.class.getEnumConstants();
        for (CapacityEnum capacityEnum : enums) {
            maxCapacity = capacityEnum.getCode() > maxCapacity ? capacityEnum.getCode() : maxCapacity;
        }
        return maxCapacity;
    }
}
